﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace SpaceShooter.Settings
{
    public static partial class GameSettings
    {
        public static class SystemSettings
        {
            private static int bufferHeight;

            public static int BufferHeight
            {
                get { return SystemSettings.bufferHeight; }
                set { SystemSettings.bufferHeight = value; }
            }


            private static int bufferWidth;

            public static int BufferWidth
            {
                get { return SystemSettings.bufferWidth; }
                set { SystemSettings.bufferWidth = value; }
            }

            public static void SetSystemData()
            {
                //TODO:then we can set data to it, The data stored in Content//Settings//systemSettings
            }

            public static float AspectRatio
            {
                get
                {
                    return ((float)bufferWidth / (float)bufferHeight);
                }
            }

            public static void read()
            {
                XmlTextReader XmlRdr = new System.Xml.XmlTextReader("Content/Settings/SystemSettings.xml");
                bufferHeight = readInt(XmlRdr, "BufferHeight");
                bufferWidth = readInt(XmlRdr, "BufferWidth");
                XmlRdr.Close();
            }
        }
    }
}
